package com.wentao.mall.model.dto;

import lombok.Data;
import lombok.ToString;

import javax.validation.constraints.Max;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 *
 *封装添加产品类别的请求信息
 */
@Data
@ToString
public class AddCategoryRequest {
    //目录名
    @NotBlank(message = "类别名不能为空")
    @Size(min = 2,max = 5)
    private String name;
    //目录层级
    @NotNull(message = "层级目录不能为空")
    @Max(value = 3,message = "目录层级不能大于3")
    private Integer type;
    //父目录id
    @NotNull(message = "父分类不能为空")
    private Integer parentId;
    //排序
    @NotNull(message = "排序不能为空")
    private Integer orderNum;
}
